export const state = () => ({
  // 菜单
  menuList: []
})

export const mutations = {
  UPDATE_MENU (state, menuList) {
    state.menuList = menuList
  }
}

export const actions = {
  async nuxtServerInit ({ commit }, { app }) {
    await app.$api.channel().then((res) => {
      commit('UPDATE_MENU', res.list)
    })
  }
}
